#!/bin/bash

set -e          # exit on error
set -o pipefail # exit on pipeline error
set -u          # treat unset variable as error

. /minioslib || exit 1

SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"

pkg update
curl -s https://api.github.com/repos/johnfactotum/foliate/releases/latest | grep browser_download_url | grep '\.deb' | cut -d '"' -f 4 | wget -i -
pkg install ./*foliate*.deb
rm -f ./*foliate*.deb
